<?php 
/*
# ------------------------------------------------------------------------
# JA Teline III - Version 1.3 - Licence Owner jSharing.COM
# ------------------------------------------------------------------------
# Copyright (C) Lifetime Joomla Just for Sharing, Ltd. All Rights Reserved.
# @license - Copyrighted Commercial Software
# Author: Joomla Just for Sharing
# Websites:  http://jsharing.com -  http://jsharing.net
# This file may not be redistributed in whole or significant part.
# ------------------------------------------------------------------------
*/ 

// no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<?php
	$subwidth = $params->get('subwidth');
	$subitemstyle = "";
	if ($subwidth) $subitemstyle = "style=\"width:$subwidth;\"";
?>
<ul class="ja-megamenu menu<?php echo $params->get('class_sfx')?>">
<?php 
foreach ($modules as $mod) {
	$mod_params = new JParameter($mod->params);
	?>
<li class="havechild mega item<?php echo $mod_params->get('moduleclass_sfx')?>">
	<?php if ($mod->showtitle): ?>
		<a class="megaitem" href="#"><span><?php echo $mod->title;?></span></a>

		<?php if ($mod->name != 'jamoduleloader') :?>
		<div class="childcontent" <?php if (!$mod_params->get('width')) echo $subitemstyle;?>>
			<div class="inner">
		<?php endif; ?>
			<?php  echo JModuleHelper::renderModule($mod);?>
		<?php if ($mod->name != 'jamoduleloader') :?>
			</div>
		</div>
		<?php endif; ?>
	<?php else: ?>
		<?php  echo JModuleHelper::renderModule($mod);?>
	<?php endif; ?>
</li>
<?php }?>
</ul>